/* eslint-disable */

export interface IProps {
  track: (action: string) => void;
  app?: string;
  pageId?: string;
  env?: string;
  userId?: string;
  eventType?: string;
  eventSource?: string;
  extParams?: any;
  callBackProps?: () => void;
  visible?: boolean;
  getContainer?: HTMLElement;
  isClass?: boolean;
  isClasshander?: () => void;
  guide?: string;
  guideCreateProject?: () => void;
  guideIgnore?: () => void;
  guideStatus?: { step: number; status: boolean; active: boolean };
  guidePropsCount?: number;
  isRepoMaster?: boolean;
  isRepoMasterHander?: () => void;
  isRepomasterOk?: () => void;
  onChangePropsCount?: (count: number) => void;
  onCloseGuide?: (dom: HTMLElement) => void;
  onChangeStep?: (step: string) => void;
}

export interface resProps {
  viewId: string;
  viewType: string;
  content: Array<{
    title: any[];
    currScore: number;
    totalScore: number;
    scoreDesc: string[];
    sub: {
      title: string;
      tags: string[];
      comment: string;
    };
  }>;
  actions: {
    submit: {
      url: string;
      method: any;
      contentType: string;
      data: {
        viewId: string;
        userId: string;
        currScore: string;
        tags: Array<{ name: string; key: string; active: boolean }>;
        comment: string;
      };
    };
    shown: {
      url: string;
      method: any;
      data: {
        surveyId: string;
        startTime: string;
        endTime: string;
      };
    };
    close: {
      url: string;
      method: any;
      contentType: string;
      data: {
        viewId: string;
        userId: string;
        currScore: string;
        tags: Array<{ name: string; key: string; active: boolean }>;
        comment: string;
      };
    };
  };
}

export type Method =
  | 'get'
  | 'GET'
  | 'delete'
  | 'DELETE'
  | 'head'
  | 'HEAD'
  | 'options'
  | 'OPTIONS'
  | 'post'
  | 'POST'
  | 'put'
  | 'PUT'
  | 'patch'
  | 'PATCH'
  | 'purge'
  | 'PURGE'
  | 'link'
  | 'LINK'
  | 'unlink'
  | 'UNLINK';

export interface PortalProps {
  target: Element;
  children: any;
  // React.ReactNode;
}
export interface SatisfactionProps {
  title: any[];
  satisfaction: string;
  dissatisfied: string;
  // rating: number;
  setRating: any;
  // React.SetStateAction<any>;
  callBackProps?: () => void;
  onclickHander?: (type: any, value?: any) => void;
}

export interface dissProps {
  title: string;
  tags: any[];
  setTags: any;
  // React.SetStateAction<any>;
  setComment: any;
  // React.SetStateAction<any>;
  onclickHander: (type: any, value?: any) => void;
  callBackProps?: () => void;
  PreviousHander?: () => void;
}

export interface RatingProps {
  // app: string;
  // pageId: string;
  env: string;
  userId: string;
  // eventType: string;
  // eventSource: string;
  // extParams: string;
  api: resProps;
  // type: string;
  callBackProps?: () => void;
  visible?: boolean;
  getContainer?: HTMLElement;
  isClass?: boolean;
  isClasshander?: () => void;
}

export interface guideProps {
  guideCreateProject: () => void;
  guideIgnore: () => void;
  guideStatus: { step: number; status: boolean; active: boolean };
  guidePropsCount: number;
  track: (action: string, rest: any) => void;
  isRepoMaster?: boolean;
  isRepoMasterHander?: () => void;
  isRepomasterOk?: () => void;
  onChangePropsCount?: (count: number) => void;
  onCloseGuide?: (dom: HTMLElement) => void;
  onChangeStep?: (step: string) => void;
}
